﻿<%@ Page Language="C#" MasterPageFile="~/cp/admin/AdminMasterPage.master" AutoEventWireup="true" Inherits="cp_admin_profile_profile" Title="Thay đổi mật khẩu quản trị" Codebehind="profile.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script type="text/javascript">
function validateNewPassword() {
    var newPassword = document.getElementById("<%= tbNewPassword.ClientID %>").value;
    if (newPassword == "") {
        return false;
    }
    return true;
}

function validateConfirmNewPassword() {
    var confirmNewPassword = document.getElementById("<%= tbConfirmNewPassword.ClientID %>").value;
    if (confirmNewPassword == "") {
        return false;
    }
    return true;
}
</script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="body" Runat="Server">
    <asp:Label ID="labelUpdateResult" runat="server" CssClass="info"></asp:Label>
    <asp:Label ID="labelChangePassword" runat="server" Text="Thay đổi mật khẩu quản trị: "></asp:Label> <br />
    <asp:Label ID="labelOldPassword" runat="server" Text="Mật khẩu cũ: "></asp:Label> <br />
    <asp:TextBox ID="tbOldPassword" runat="server" TextMode="Password"></asp:TextBox> 
    <asp:RequiredFieldValidator ID="oldPasswordRequireValidator" runat="server" 
        ErrorMessage="Xin hãy nhập mật khẩu cũ." 
        ControlToValidate="tbOldPassword"></asp:RequiredFieldValidator>
    <br />
    <asp:Label ID="labelNewPassword" runat="server" Text="Mật khẩu mới: "></asp:Label> <br />
    <asp:TextBox ID="tbNewPassword" runat="server" TextMode="Password"></asp:TextBox> 
    <asp:CustomValidator ID="newPasswordValidator" runat="server" 
        ErrorMessage=""
        ControlToValidate="tbNewPassword" 
        onservervalidate="newPasswordValidator_ServerValidate" 
        SetFocusOnError="True" ValidateEmptyText="True"></asp:CustomValidator>
    <br />
    <asp:Label ID="labelConfirmPassword" runat="server" Text="Xác nhận mật khẩu mới: "></asp:Label> <br />
    <asp:TextBox ID="tbConfirmNewPassword" runat="server" TextMode="Password"></asp:TextBox> 
    <asp:CustomValidator ID="confirmNewPasswordValidator" runat="server" 
        ErrorMessage="" 
        ControlToValidate="tbConfirmNewPassword" 
        onservervalidate="confirmNewPasswordValidator_ServerValidate" 
        SetFocusOnError="True" ValidateEmptyText="True"></asp:CustomValidator>
    <br />
    <asp:Button ID="btnChangePassword" runat="server" Text="Chấp nhận" 
        onclick="btnChangePassword_Click" />
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="navigation" Runat="Server">
    <ul class="nav">
		<li><a href="#">Thay đổi mật khẩu</a></li>
	</ul>
</asp:Content>


